// <copyright file="PPIDReflector.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-15</date>
// <summary>Implements a PPID generator which uses the selector generated PPID suggested in the RST.</summary>

namespace SharpSTS
{
    using System.ServiceModel;

    /// <summary>
    /// Implements a <see cref="PPIDGeneratorProvider"/> which returns the PPID suggested in the RST.
    /// </summary>
    internal class PPIDReflector : PPIDGeneratorProvider
    {
        /// <summary>
        /// Gets the PPID.
        /// </summary>
        /// <param name="cardId">The card identifier for the current request</param>
        /// <param name="endpoint">The relaying party <see cref="EndpointAddress"/>.</param>
        /// <param name="selectorSuggestedPPID">The selector suggested PPID.</param>
        /// <returns>A <paramref name="selectorSuggestedPPID"/></returns>
        public override string GetPPID(string cardId, EndpointAddress endpoint, string selectorSuggestedPPID)
        {
            return selectorSuggestedPPID;
        }
    }
}
